package com.atguigu.cart.service;

import com.atguigu.cart.vo.Cart;
import com.atguigu.cart.vo.CartItem;

import java.util.List;
import java.util.concurrent.ExecutionException;

/**
 * description: CartService
 * date: 2022/12/15 18:19
 * author: MR.孙
 */
public interface CartService {
    CartItem addToCart(Long skuId, Integer num) throws ExecutionException, InterruptedException;

    CartItem getCartItem(Long skuId);

    Cart getCart() throws ExecutionException, InterruptedException;

    void checkItem(Long skuId, Integer checked);

    void countItem(Long skuId, Integer num);


    void deleteItem(Long skuId);

    List<CartItem> getUserCartItems();
}
